Trivial fixes for 64bit and xend.
authorsmh22@tempest.cl.cam.ac.uk <smh22@tempest.cl.cam.ac.uk>
Wed, 16 Nov 2005 17:03:48 +0000 (18:03 +0100)
committersmh22@tempest.cl.cam.ac.uk <smh22@tempest.cl.cam.ac.uk>
Wed, 16 Nov 2005 17:03:48 +0000 (18:03 +0100)
Signed-off-by: Steven Hand <steven@xensource.com>
linux-2.6-xen-sparse/arch/xen/x86_64/kernel/setup.c
tools/libxc/xc_linux_build.c
tools/python/xen/xend/XendDomainInfo.py

index 01737755422e290e7b280fc6ff72db303a8b240d..9e1a0232820d5e3d8264791524923774f9fe87c4 100644 (file)
@@ -770,9 +770,9 @@ void __init setup_arch(char **cmdline_p)
                pfn_to_mfn_frame_list_list = alloc_bootmem(PAGE_SIZE);
                HYPERVISOR_shared_info->arch.pfn_to_mfn_frame_list_list =
                  virt_to_mfn(pfn_to_mfn_frame_list_list);
-              
+
                fpp = PAGE_SIZE/sizeof(unsigned long);
-               for ( i=0, j=0, k=-1; i< max_pfn; i+=fpp, j++ )
+               for ( i=0, j=0, k=-1; i< end_pfn; i+=fpp, j++ )
                {
                        if ( (j % fpp) == 0 )
                        {
@@ -786,9 +786,12 @@ void __init setup_arch(char **cmdline_p)
                        pfn_to_mfn_frame_list[k][j] = 
                                virt_to_mfn(&phys_to_machine_mapping[i]);
                }
-               HYPERVISOR_shared_info->arch.max_pfn = max_pfn;
+               HYPERVISOR_shared_info->arch.max_pfn = end_pfn;
+
        }
 
+
+
        if ( ! (xen_start_info->flags & SIF_INITDOMAIN))
        {
                acpi_disabled = 1;
index d5c784c0190ef49a75d5e28ab06c1a69f726ffe4..4cc145c9318dc93cd2abd117b6ce456104763763 100644 (file)
@@ -629,7 +629,7 @@ static int setup_guest(int xc_handle,
     memset(start_info, 0, sizeof(*start_info));
     rc = xc_version(xc_handle, XENVER_version, NULL);
     sprintf(start_info->magic, "xen-%i.%i-x86_%d%s",
-            rc >> 16, rc & (0xFFFF), sizeof(long)*8,
+            rc >> 16, rc & (0xFFFF), (unsigned int)sizeof(long)*8,
             dsi.pae_kernel ? "p" : "");
     start_info->nr_pages     = nr_pages;
     start_info->shared_info  = shared_info_frame << PAGE_SHIFT;
index 029a7d8c66c0e9a502f1162032ecb21b5eebfae7..d241b88b08fb3317b310dbc9501136bc8bc9fbac 100644 (file)
@@ -597,7 +597,8 @@ class XendDomainInfo:
         if self.infoIsSet('image'):
             to_store['image'] = sxp.to_string(self.info['image'])
 
-        to_store['start_time'] = str(self.info['start_time'])
+        if self.infoIsSet('start_time'):
+            to_store['start_time'] = str(self.info['start_time'])
 
         log.debug("Storing VM details: %s", to_store)